package com.zr.model;
// Generated 2017-7-3 20:01:15 by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Distributionscope generated by hbm2java
 */
@Entity
@Table(name = "distributionscope", catalog = "lms")
public class Distributionscope implements java.io.Serializable {

	private Integer dsId;
	private Deliverypoint deliverypoint;
	private String dsName;
	private String dsDate;
	private String dsRemarks;
	private Set<Distributionrangeprice> distributionrangeprices = new HashSet<Distributionrangeprice>(0);

	public Distributionscope() {
	}

	public Distributionscope(Deliverypoint deliverypoint, String dsName, String dsDate, String dsRemarks,
			Set<Distributionrangeprice> distributionrangeprices) {
		this.deliverypoint = deliverypoint;
		this.dsName = dsName;
		this.dsDate = dsDate;
		this.dsRemarks = dsRemarks;
		this.distributionrangeprices = distributionrangeprices;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "dsId", unique = true, nullable = false)
	public Integer getDsId() {
		return this.dsId;
	}

	public void setDsId(Integer dsId) {
		this.dsId = dsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dpId")
	public Deliverypoint getDeliverypoint() {
		return this.deliverypoint;
	}

	public void setDeliverypoint(Deliverypoint deliverypoint) {
		this.deliverypoint = deliverypoint;
	}

	@Column(name = "dsName")
	public String getDsName() {
		return this.dsName;
	}

	public void setDsName(String dsName) {
		this.dsName = dsName;
	}

	@Column(name = "dsDate")
	public String getDsDate() {
		return this.dsDate;
	}

	public void setDsDate(String dsDate) {
		this.dsDate = dsDate;
	}

	@Column(name = "dsRemarks")
	public String getDsRemarks() {
		return this.dsRemarks;
	}

	public void setDsRemarks(String dsRemarks) {
		this.dsRemarks = dsRemarks;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "distributionscope")
	public Set<Distributionrangeprice> getDistributionrangeprices() {
		return this.distributionrangeprices;
	}

	public void setDistributionrangeprices(Set<Distributionrangeprice> distributionrangeprices) {
		this.distributionrangeprices = distributionrangeprices;
	}

}
